package overview;

/**
 * @author oldliu
 * @since 1.0
 */
//递归
public class Digui {
    public static void a(){
        System.out.println("a");
        a();
    }
    //阶乘
    public static long jiechen(int x){
        if(x<=1)
            return 1;
        return x*jiechen(x-1);
    }
    //斐波拉契数列的第n项
    public static long fb(int n){
        if(n>2)
        {
            return fb(n-1)+fb(n-2);
        }
        return 1;
    }

    public static void main(String[] args) {
        //a();
        long x=jiechen(4);
        System.out.println(x);
    }
}
